package com.yuwubao.hz_International.entities;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by yangyu on 2018/1/25.
 * 账户记录
 */
@Entity
@Table(name = "acount_detail")
@ApiModel(value = "资金明细")
public class AcountDetailEntity {

    /**
     * 主键、自增长
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;

    /**
     * 会员ID
     */
    @ApiModelProperty(value = "会员id")
    private int consumerId;

    /**
     * 生成时间
     */
    @ApiModelProperty(value = "生成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 操作后的消费金
     */
    @ApiModelProperty(value = "操作后的消费金")
    private BigDecimal currentMoney;

    /**
     * 操作后福利金
     */
    @ApiModelProperty(value = "操作后的福利金")
    private BigDecimal currentWelfare;

    /**
     * 操作后积分
     */
    @ApiModelProperty(value = "操作后积分")
    private BigDecimal currentBonous;

    /**
     * 操作后的礼券
     */
    @ApiModelProperty(value = "操作后的礼券")
    private BigDecimal currentGift;

    /**
     * 操作类型：0:消费金；1:福利金；2:积分；3:礼券
     */
    @ApiModelProperty(value = "操作类型 0:消费金 1:福利金 2:积分 3:礼券")
    private int type;

    /**
     *用途1,线下充值;2,兑换积分;3,转福利金;4,转消费金;5,利息;6,粉丝充值;
     * 7,邀请好友;8,系统自动结转;9,线下支付;10,线下收款;11,线上支付;12,线上收款;13,线上充值
     */
    @ApiModelProperty(value = "用途1,线下充值;2,兑换积分;3,转福利金;4,转消费金;5,利息;6,粉丝充值;7,邀请好友;8,系统自动结转;9,线下支付;10,线下收款;11,线上支付;12,线上收款;13,线上充值")
    private int useType;

    /**
     * 消费金
     */
    @ApiModelProperty(value = "消费金")
    private String money;

    /**
     * 福利金
     */
    @ApiModelProperty(value = "福利金")
    private String welfare;

    /**
     * 积分
     */
    @ApiModelProperty(value = "积分")
    private String bonouse;

    /**
     * 礼券
     */
    @ApiModelProperty(value = "礼券")
    private String gift;

    /**
     * 支付方式，1:支付宝 ；2:现金；3:微信
     */
    @ApiModelProperty(value = "支付方式，1:支付宝 ；2:现金；3:微信")
    private int payType;

    private String name;

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getConsumerId() {
        return consumerId;
    }

    public void setConsumerId(int consumerId) {
        this.consumerId = consumerId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getCurrentMoney() {
        return currentMoney;
    }

    public void setCurrentMoney(BigDecimal currentMoney) {
        this.currentMoney = currentMoney;
    }

    public BigDecimal getCurrentWelfare() {
        return currentWelfare;
    }

    public void setCurrentWelfare(BigDecimal currentWelfare) {
        this.currentWelfare = currentWelfare;
    }

    public BigDecimal getCurrentBonous() {
        return currentBonous;
    }

    public void setCurrentBonous(BigDecimal currentBonous) {
        this.currentBonous = currentBonous;
    }

    public BigDecimal getCurrentGift() {
        return currentGift;
    }

    public void setCurrentGift(BigDecimal currentGift) {
        this.currentGift = currentGift;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUseType() {
        return useType;
    }

    public void setUseType(int useType) {
        this.useType = useType;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getWelfare() {
        return welfare;
    }

    public void setWelfare(String welfare) {
        this.welfare = welfare;
    }

    public String getBonouse() {
        return bonouse;
    }

    public void setBonouse(String bonouse) {
        this.bonouse = bonouse;
    }

    public String getGift() {
        return gift;
    }

    public void setGift(String gift) {
        this.gift = gift;
    }

    public int getPayType() {
        return payType;
    }

    public void setPayType(int payType) {
        this.payType = payType;
    }
}